A rotating electrical machine, the entire device of which is downsized by integrating a rotating electrical machine and a power inverter, is known. PTL 1 suggests a rotating electrical machine unit having a cooling unit between a rotating electrical machine and a power inverter for cooling both of the rotating electrical machine and the power inverter.